Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal: Use rustup rust-analyzer component when there is a toolchain file override for the opened workspace #17667

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Jul 22, 2024

Fixes #17663

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 22, 2024
@Veykril
Copy link
Member Author

Veykril commented Jul 22, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jul 22, 2024

📌 Commit 02c8b7d has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 22, 2024

⌛ Testing commit 02c8b7d with merge 44f1eb4...

@bors
Copy link
Contributor

bors commented Jul 22, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 44f1eb4 to master...

@bors bors merged commit 44f1eb4 into rust-lang:master Jul 22, 2024
11 checks passed
@lnicola lnicola changed the title Use rustup rust-analyzer component when there is a toolchain file override for the opened workspace internal: Use rustup rust-analyzer component when there is a toolchain file override for the opened workspace Jul 22, 2024
// and if the toolchain of this override has a rust-analyzer component
// if so, use the rust-analyzer component
const toolchainTomlExists = await fileExists(
vscode.Uri.joinPath(vscode.workspace.workspaceFolders[0]!.uri, "rust-toolchain.toml"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nb. this doesn't handle rust-toolchain, but I think it's fine.

@Veykril Veykril deleted the r-a-component-override branch July 26, 2024 06:57
@davidbarsky
Copy link
Contributor

Wait, why does this one prefer a rustup-provided rust-analyzer over a bundled rust-analyzer? I'd expect that the bundled one would take priority.

@Veykril
Copy link
Member Author

Veykril commented Aug 1, 2024

See the discussion in #17663, if the user explicitkly installed the rust-analyzer component in a toolchain override it is a big indicator they meant to use that instead. And a toolchain r-a is usually compatible with the toolchain where as the bundled one only supports the last couple stable releases

@davidbarsky
Copy link
Contributor

Ah, I assumed that the presence of any rust-toolchain.toml file would pull the rust-analyzer component from there. My bad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VSCode should honor toolchain overrides that contain a rust-analyzer component for server spawning
5 participants